<div class="form">
    <?php
    $formConfig['htmlOptions']['class'] = 'form-horizontal';
    $formConfig['htmlOptions']['role'] = 'form';
    ?> 
    <?php $form = $this->beginWidget('ActiveForm', $formConfig); ?>
    <?php
    echo $form->alert(array($account, $address, $content), array(
        'errorMessageHtmlOptions' => array('class' => 'alert alert-danger'),
        'flashHtmlOptions' => array('class' => 'alert alert-'),
    ));
    ?>

    <?php if (!$account->isNewRecord): ?>
        <div class="form-group">
            <?php echo $form->labelEx($account, 'id_', array('class' => 'col-sm-2 control-label')); ?>
            <div class="col-sm-2">
                <div class="form-control-static">
                    <?php echo $account->id; ?>
                </div>
            </div>
        </div>
    <?php endif; ?>

    <div class="form-group">
        <?php echo $form->labelEx($account, 'status_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
        <?php echo $form->dropDownList($account, 'status_', $account->statusOption, array('class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($account, 'status_'); ?>
    </div>

    <div class="form-group">
        <?php echo $form->labelEx($account, 'type_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
        <?php echo $form->dropDownList($account, 'type_', $account->typeOption, array('class'=>'form-control')); ?>
        </div>
        <?php //echo $form->error($account, 'type_'); ?>
    </div>

    <hr />

    <div class="form-group">
        <?php echo $form->labelEx($account, 'image_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
        <?php echo $form->logoUpload($account, 'image_'); ?>
        </div>
        <?php //echo $form->error($account, 'image_'); ?>
    </div>

    <div class="form-group">
        <?php echo $form->labelEx($account, 'name_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-5">
        <?php echo $form->textField($account, 'name_',array('class'=>'form-control')); ?>
        </div>
        <?php //echo $form->error($account, 'name_'); ?>
    </div>

    <div class="form-group">
        <?php echo $form->labelEx($account, 'displayName_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
        <?php echo $form->textField($account, 'displayName_',array('class'=>'form-control')); ?>
        </div>
        <?php //echo $form->error($account, 'displayName_'); ?>
    </div>

    <div class="form-group">
        <?php echo $form->labelEx($account, 'contactNumber_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
        <?php echo $form->textField($account, 'contactNumber_',array('class'=>'form-control')); ?>
        </div>
        <?php //echo $form->error($account, 'contactNumber_'); ?>

        <?php echo $form->labelEx($account, 'faxNumber_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
        <?php echo $form->textField($account, 'faxNumber_',array('class'=>'form-control')); ?>
        </div>
        <?php //echo $form->error($account, 'faxNumber_'); ?>
    </div>

    <div class="form-group">
        <?php echo $form->labelEx($account, 'mobileNumber_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
        <?php echo $form->textField($account, 'mobileNumber_',array('class'=>'form-control')); ?>
        </div>
        <?php //echo $form->error($account, 'mobileNumber_'); ?>
        
        <?php echo $form->labelEx($account, 'email_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
        <?php echo $form->textField($account, 'email_',array('class'=>'form-control')); ?>
        </div>
        <?php //echo $form->error($account, 'email_'); ?>
    </div>

    <div class="form-group">
        <?php echo $form->labelEx($account, 'url_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-5">
        <?php echo $form->textField($account, 'url_',array('class'=>'form-control')); ?>
        </div>
        <?php //echo $form->error($account, 'url_'); ?>
    </div>    
    
    <hr />

    <div class="form-group">
        <?php echo $form->labelEx($address, 'address_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-6">
            <?php echo $form->textField($address, 'address_', array('class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($address,'address_');  ?>
    </div>

    <!--
    <div class="form-group">
    <?php echo $form->labelEx($address, 'street_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-3">
    <?php echo $form->textField($address, 'street_', array('class' => 'form-control')); ?>
        </div>
    <?php //echo $form->error($address,'street_'); ?>
    </div>
    
    <div class="form-group">
    <?php echo $form->labelEx($address, 'district_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
    <?php echo $form->textField($address, 'district_', array('class' => 'form-control')); ?>
        </div>
    <?php //echo $form->error($address,'district_');  ?>
    </div>
    -->

    <div class="form-group">
        <?php echo $form->labelEx($address, 'city_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
            <?php echo $form->textField($address, 'city_', array('class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($address,'city_'); ?>

        <?php echo $form->labelEx($address, 'state_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
            <?php echo $form->textField($address, 'state_', array('class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($address,'state_');  ?>    
    </div>

    <!--
    <div class="form-group">
    <?php echo $form->labelEx($address, 'province_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
    <?php echo $form->textField($address, 'province_', array('class' => 'form-control')); ?>
        </div>
    <?php //echo $form->error($address,'province_'); ?>
    </div>
    
    <div class="form-group">
    <?php echo $form->labelEx($address, 'typeNumber_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
    <?php echo $form->textField($address, 'typeNumber_', array('class' => 'form-control')); ?>
        </div>
    <?php //echo $form->error($address,'typeNumber_'); ?>
    </div>
    
    <div class="form-group">
    <?php echo $form->labelEx($address, 'locality_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
    <?php echo $form->textField($address, 'locality_', array('class' => 'form-control')); ?>
        </div>
    <?php //echo $form->error($address,'locality_');  ?>
    </div>
    -->

    <div class="form-group">
        <?php echo $form->labelEx($address, 'postalCode_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
            <?php echo $form->textField($address, 'postalCode_', array('class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($address,'postalCode_'); ?>

        <?php echo $form->labelEx($address, 'country_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
            <?php echo $form->dropDownList($address, 'country_', $address->countryOption, array('class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($address,'country_'); ?>
    </div>

    <div class="form-group">
        <?php echo $form->labelEx($address, 'latitude_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
            <?php echo $form->textField($address, 'latitude_', array('class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($address,'latitude_'); ?>

        <?php echo $form->labelEx($address, 'longitude_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-2">
            <?php echo $form->textField($address, 'longitude_', array('class' => 'form-control')); ?>
        </div>
        <?php //echo $form->error($address,'longitude_');  ?>
    </div>

    <hr />
    
    <div class="form-group">
        <?php echo $form->labelEx($account, 'categoryId_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-5">
            <?php
            echo $form->checkBoxList($account, 'categoryId_', $account->categoryOption, array(
                'labelOptions' => array('class' => 'checkbox-inline'),
                'template' => '{beginLabel}{input} <i class="fa fa-circle-o small"></i>{labelTitle}{endLabel}',
                'separator' => '<br />',
                'checkAll' => 'Select All',
            ));
            ?>
        </div>
        <?php //echo $form->error($account, 'categoryId_');  ?>
    </div>
    
    <hr />    
    
    <div class="form-group">
        <?php echo $form->labelEx($content, 'content_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-7">
        <?php echo $form->editorTextArea($content, 'content_'); ?>
        </div>
        <?php //echo $form->error($content, 'content_'); ?>
    </div>

    <div class="form-group">
        <?php echo $form->labelEx($content, 'sefUrl_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-5">
        <?php echo $form->textField($content, 'sefUrl_',array('class'=>'form-control')); ?>
        </div>
        <?php //echo $form->error($content, 'sefUrl_'); ?>
    </div>

    <div class="form-group">
        <?php echo $form->labelEx($content, 'metaTitle_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-5">
        <?php echo $form->textField($content, 'metaTitle_', array('class'=>'form-control')); ?>
        </div>
        <?php //echo $form->error($content, 'metaTitle_'); ?>
    </div>

    <div class="form-group">
        <?php echo $form->labelEx($content, 'metaDescription_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-7">
        <?php echo $form->textArea($content, 'metaDescription_', array('rows' => 6, 'cols' => 80)); ?>
        </div>
        <?php //echo $form->error($content, 'metaDescription_'); ?>
    </div>

    <div class="form-group">
        <?php echo $form->labelEx($content, 'metaKeywords_', array('class' => 'col-sm-2 control-label')); ?>
        <div class="col-sm-5">
        <?php echo $form->textField($content, 'metaKeywords_', array('class'=>'form-control')); ?>
        </div>
        <?php //echo $form->error($content, 'metaKeywords_'); ?>
    </div>

    <hr />



    
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-6">
            <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-floppy-save"></span> <?php echo $account->isNewRecord ? Lang::t('account.create.btn.submit') : Lang::t('account.update.btn.submit'); ?></button>
            <a href="<?php echo $this->homeUrl; ?>" class="btn btn-default"><span class="glyphicon glyphicon-floppy-remove"></span> <?php echo Lang::t('account.create.btn.cancel'); ?></a>
        </div>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->